{include file="public/head" /}
<title>人员管理</title>
</head>

<body>
<div id="right_ctn">
    <div class="right_m">
        <div class="hy_list">
            <div class="box_t">
                <span class="name">人员管理</span>
                <!--当前位置-->
                <div class="position">
                    <a><img src="__STATIC__/admin//images/icon5.png" alt=""/></a>
                    <a href="{:url('admin/Index/index')}" target="_top">首页</a>
                    <span><img src="__STATIC__/admin//images/icon3.png" alt=""/></span>
                    <a href="">用户管理</a>
                    <span><img src="__STATIC__/admin//images/icon3.png" alt=""/></span>
                    <a href="{:url('admin/StaffController/index')}">人员管理</a>
                </div>
                <!--当前位置-->
            </div>
            <div class="space_hx">&nbsp;</div>
            <div class="xjhy" style="padding:0px;">
                <div class="tabBox_t">
                    <div class="tabBox">
                      <ul class="tabNav">
                        <li><span><a href="{:url('admin/StaffController/index')}">人员信息</a></span></li>
                        <li><span><a href="{:url('admin/StaffController/add')}">添加人员</a></span></li>
                        <li class="now"><span>编辑人员信息</span></li>
                      </ul>
                        <div class="tabCont" style="height: 530px;display: block;">
                            <div class="col-md-1"></div>
                            <form action="{:url('admin/StaffController/editPost')}" method="post" id="form">
                                <div class="col-md-5">
                                    <div class="form-group">
                                        <label for="name"><span class="form-required">*</span>姓名</label>
                                        <input type="text" id="name" name="name" class="form-control" value="{$data['name']}">
                                    </div>
                                    <div class="form-group">
                                        <label for="sex"><span class="form-required">*</span>性别</label>
                                        <select name="sex" id="sex" class="form-control">
                                            <option hidden>未设置</option>
                                            {php}$sexArray = array("1"=>"男","2"=>"女");{/php}
                                            {foreach name="sexArray" item="vo"}
                                            {php}$selected=$key==$data['sex']?"selected":"";{/php}
                                            <option value="{$key}" {$selected}>{$vo}</option>
                                            {/foreach}
                                        </select>
                                    </div>
                                    <div class="form-group">
                                        <label for="dep_id"><span class="form-required">*</span>部门</label>
                                        <select name="dep_id" id="dep_id" class="form-control" onchange="updateDep(this);">
                                            <option hidden>请选择部门</option>
                                            {volist name="depList" id="vo"}
                                            {php}$selected=$vo['id']==$data['dep_id']?"selected":"";{/php}
                                            <option value="{$vo.id}" {$selected}>{$vo.name}</option>
                                            {/volist}
                                        </select>
                                    </div>
                                    <div class="form-group">
                                        <label for="job_id"><span class="form-required">*</span>岗位</label>
                                        <select name="job_id" id="job_id" class="form-control">
                                            <option value="" hidden>请选择岗位</option>
                                            {volist name="jobList" id="vo"}
                                            {php}$selected=$vo['id']==$data['job_id']?"selected":"";{/php}
                                            <option value="{$vo.id}" {$selected}>{$vo.name}</option>
                                            {/volist}
                                        </select>
                                    </div>

                                    <div class="form-group">
                                        <label for="jnum"><span class="form-required">*</span>工号</label>
                                        <input class="form-control" type="text" id="jnum" name="job_number" value="{$data['job_number']}">
                                    </div>
                                    <div class="form-group">
                                        <label for="province"><span class="form-required">*</span>户籍地</label>
                                        <div class="form-inline">
                                            <select name="province_id" id="province" class="form-control" onchange="provinceChange(this);">
                                                <option hidden>请选择省份</option>
                                                {volist name="provinceList" id="vo"}
                                                {php}$selected=$vo['id']==$data['province_id']?"selected":"";{/php}
                                                <option value="{$vo.id}" {$selected}>{$vo.name}</option>
                                                {/volist}
                                            </select>
                                            <select name="city_id" id="city" class="form-control" onchange="cityChange(this);">
                                                <option hidden>请选择城市</option>
                                                {volist name="cityList" id="vo"}
                                                {php}$selected=$vo['id']==$data['city_id']?"selected":"";{/php}
                                                <option value="{$vo.id}" {$selected}>{$vo.name}</option>
                                                {/volist}
                                            </select>
                                            <select name="district_id" id="district" class="form-control">
                                                <option hidden>请选择区县</option>
                                                {volist name="districtList" id="vo"}
                                                {php}$selected=$vo['id']==$data['district_id']?"selected":"";{/php}
                                                <option value="{$vo.id}" {$selected}>{$vo.name}</option>
                                                {/volist}
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-5">
                                    <div class="form-group">
                                        <label for="phone"><span class="form-required">*</span>手机</label>
                                        <input type="tel" id="phone" name="mobile" class="form-control" value="{$data['mobile']}">
                                    </div>
                                    <div class="form-group">
                                        <label for="email"><span class="form-required">*</span>邮箱</label>
                                        <input type="email" id="email" name="email" class="form-control" value="{$data['email']}">
                                    </div>
                                    <div class="form-group">
                                        <label for="bir"><span class="form-required">*</span>出生时间</label>
                                        <input class="form-control jeinput" name="birthday" placeholder="请选择时间"
                                           value="{$data['last_login_time']|date='Y-m-d',###}" type="text" id="bir" onfocus=this.blur() >
                                    </div>
                                    <div class="form-group">
                                        <label for="employ_date"><span class="form-required">*</span>入职时间</label>
                                        <input class="form-control jeinput" name="employ_date" placeholder="请选择时间"
                                               value="{$data['employ_date']|date='Y-m-d',###}" type="text" id="employ_date" onfocus=this.blur() >
                                    </div>

                                    <div class="form-group">
                                        <label for="username"><span class="form-required">*</span>登录名</label>
                                        <input type="text" readonly id="username" class="form-control" value="{$data['username']}">
                                    </div>

                                    <div class="form-group pull-right" style="margin-top: 30px;">
                                        <input type="text" hidden value="{$data['id']}" name="id">
                                        <a class="btn btn-primary ajax-submit">保存</a>
                                        <a class="btn btn-default" href="{:url('admin/StaffController/index')}">返回</a>
                                    </div>
                                </div>
                            </form>
                        </div>                
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $("#employ_date").jeDate({
        format: "YYYY-MM-DD"
    });
    $("#bir").jeDate({
        format: "YYYY-MM-DD"
    });
</script>
<script src="__STATIC__/js/ajax-form.js"></script>
<script src="__STATIC__/js/provinceCity.js"></script>
<script src="__STATIC__/js/dep-job.js"></script>
</body>
</html>
